<div style="overflow:hidden; margin: 5px; min-width: 850px;">
<div style="float:right; padding:15px; margin: 5px; background-color:#EEEEEE; border: 1px solid #A9A9A9; width: 250px; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius:5px;">
    <h2>Have a question, bug report, or feedback <br />about this app?</h2>
    <p style="margin-top:10px; margin-bottom:13px; padding-bottom:10px;">
    ${_('Ask a question on <strong><a href="%s">Splunk Answers</a></strong>.') % ( make_url('http://answers.splunk.com/questions/ask?tags=app-tomcat-splunk') ) }
    </p>

    <h2>Configure this app</h2>
    <p style="margin-top:10px; margin-bottom:5px; padding:0">
    ${_('Change app configuration using <strong><a href="%s%s">App Setup</a></strong>') % ( make_url(['manager', APP['id'], 'apps/local', APP['id']]), '/setup?action=edit' ) }
    </p>

    <p style="margin-top:20px; margin-bottom:0px; padding:10px; background-color:#F5F6C3; border:solid 2px #FF0000; display:none;" id="newVersionNotice">
    ${_('<strong>A new version of this app is available!</strong><br /><strong><a href="%s" target="_blank">Download Now</a></strong>') % ( 'http://www.splunkbase.com/apps/Splunk+for+Tomcat' ) }
    </p>

</div>
<div style="float: left; overflow:hidden; ">
    <div style="float: left;">
        <h1>Explore Splunk for Tomcat Application Server</h1> 
    </div>
    <br style="clear:both;" />
    <br style="clear:both;" />
    <div style="float: left; margin-right: 20px; "> 
    In a hurry? Start searching Tomcat data using the box above, or try out a pre-built dashboard.
    </div>
    <br style="clear:both;" />
    <br style="clear:both;" />
    <div style="float: left; margin-right: 20px;  width: 150px;"> 
        <h2>Performance dashboards</h2>
        <ul style="padding-left:2px;">
	        <li>${_('<strong><a href="%s">System Metrics</a></strong>') % ( make_url(['app', APP['id'], 'tomcat_system_metrics']) ) }</li>
	        <li>${_('<strong><a href="%s">JVM Memory</a></strong>') % ( make_url(['app', APP['id'], 'tomcat_jvm_memory_timeline_dashboard']) ) }</li>
	        <li>${_('<strong><a href="%s">Database Connection</a></strong>') % ( make_url(['app', APP['id'], 'tomcat_database_connection_timeline_dashboard']) ) }</li>
	        <li>${_('<strong><a href="%s">Transaction</a></strong>') % ( make_url(['app', APP['id'], 'tomcat_transaction_timeline_dashboard']) ) }</li>
	        <li>${_('<strong><a href="%s">Thread Pool</a></strong>') % ( make_url(['app', APP['id'], 'tomcat_threadpool_timeline_dashboard']) ) }</li>
        </ul>
    </div>
    <div style="float: left; margin-right: 20px;  width: 150px; border-right: 1px dotted #808080;"> 
        <h2>&nbsp;</h2>
        <ul style="padding-left:2px;">
	        <li>${_('<strong><a href="%s">Servlets</a></strong>') % ( make_url(['app', APP['id'], 'tomcat_servlets_timeline_dashboard']) ) }</li>
	        <li>${_('<strong><a href="%s">EJB</a></strong>') % ( make_url(['app', APP['id'], 'tomcat_ejb_timeline_dashboard']) ) }</li>
	        <li>${_('<strong><a href="%s">Dynamic Cache</a></strong>') % ( make_url(['app', APP['id'], 'tomcat_dynacache_dashboard']) ) }</li>
	        <li>${_('<strong><a href="%s">Sessions</a></strong>') % ( make_url(['app', APP['id'], 'tomcat_session_timeline_dashboard']) ) }</li>
        </ul>
    </div>
    <div style="float: left; margin-right: 20px;  width: 150px; margin-left: 10px;"> 
        <h2>Other dashboards</h2>
        <ul style="padding-left:2px;">
	        <li>${_('<strong><a href="%s">Configuration</a></strong>') % ( make_url(['app', APP['id'], 'tomcat_configuration_dashboard']) ) }</li>
	        <li>${_('<strong><a href="%s">Troubleshooting</a></strong>') % ( make_url(['app', APP['id'], 'tomcat_troubleshooting_dashboard']) ) }</li>
			<li>${_('<strong><a href="%s">Security</a></strong>') % ( make_url(['app', APP['id'], 'tomcat_security_dashboard']) ) }</li>
        </ul>
    </div>
    <br style="clear:both;" />
    <div style="float: left;">
		<p>
			<strong>Important:</strong> Splunk for Tomcat Application Server stores data in its own <strong>"tomcat"</strong> index .<br/>
			To search Tomcat data, include <strong>"index=tomcat"</strong> in your search.
			
			${_('<a href="%s%s">example...</a>') % ( make_url(['app', APP['id']]), '/flashtimeline?q=search%20index%3Dtomcat%20%7C%20head%205000' ) }
		</p>
    </div>
</div>

</div>
<script>

    function checkForUpdates()
    {
        var f = frames["updateframe"];
        if (f)
        {
            var newVersion = f.checkForNewVersion("Splunk for Tomcat", f.getCurrentAppVersion());
            if (newVersion) {
                setTimeout(function () { $("#newVersionNotice").fadeIn('slow'); }, 1000)
            }
        }
    }

    $(document).ready(function () {
        $("#newVersion").hide();
        $(document.body).append('<iframe id="updateframe" name="updateframe" style="display:none">');
        $('iframe#updateframe').load(function () {
            checkForUpdates();
        });
        $('iframe#updateframe').attr('src', 'checkversion');
    });
</script>
